import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int h = in.nextInt();
        int b = in.nextInt();
        int k = in.nextInt();
        long ret = 0;
        while(h > 0 && k > 0) {
            ret += b;
            ret += a;
            h -= b; k -= a;
        }

        if(h > 0) {
            ret += a * 10;
            h = 0;
        }
        if(k > 0) {
            ret += b * 10;
            k = 0;
        }
        System.out.println(ret);
    }
}